import java.util.Scanner;

public class test5 {
    //找位置
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = in.nextInt();;
        }
        int target = in.nextInt();

    }

    public static int searchInsert(int[] nums, int target) {
        // 递归
        if(nums==null||nums.length==0)
            return 0;
        int left=0,right=nums.length-1;
        while (left<=right){
            int mid = left+(right-left)/2;
            if(nums[mid]==target)
                return mid;
            else if (nums[mid]<target) {
                left = mid+1;
            }else {
                right = mid-1;
            }
        }
        return left;
    }
}
